****************************************
* Table C1: Strongest Hurricane Experienced in CCES
******************************************

preserve
use "$input/cces-strongest.dta", clear


qui reg risk i.race_14 i.education female i.income_quarters employed out_of_labour age treat_dum50, r	
qui gen coef=_b[treat_dum50]
qui sum risk if treat_dum50==0 & e(sample)
qui gen cmean = r(mean)
qui gen percent = coef/cmean * 100
local mean1 = round(cmean, 0.001)
local percent1 = round(percent, 0.001) 
outreg2 using "$output/tabc1.doc", addtext("Control Mean =", "`mean1'",)  replace dec(3)   
drop cmean coef percent treat_dum50
local foo


qui reg risk i.race_14 i.education female i.income_quarters employed out_of_labour age treat_dum100, r	
qui gen coef=_b[treat_dum100]
qui sum risk if treat_dum100==0 & e(sample)
qui gen cmean = r(mean)
qui gen percent = coef/cmean * 100
local mean1 = round(cmean, 0.001)
local percent1 = round(percent, 0.001) 
outreg2 using "$output/tabc1.doc", addtext("Control Mean =", "`mean1'",)  append dec(3)   
drop cmean coef percent treat_dum100
local foo


qui reg risk i.race_14 i.education female i.income_quarters employed out_of_labour age treat_dum200, r	
qui gen coef=_b[treat_dum200]
qui sum risk if treat_dum200==0 & e(sample)
qui gen cmean = r(mean)
qui gen percent = coef/cmean * 100
local mean1 = round(cmean, 0.001)
local percent1 = round(percent, 0.001) 
outreg2 using "$output/tabc1.doc", addtext("Control Mean =", "`mean1'",)  append dec(3)   
drop cmean coef percent treat_dum200
local foo

qui reg risk i.race_14 i.education female i.income_quarters employed out_of_labour age treat_dum500, r	
qui gen coef=_b[treat_dum500]
qui sum risk if treat_dum500==0 & e(sample)
qui gen cmean = r(mean)
qui gen percent = coef/cmean * 100
local mean1 = round(cmean, 0.001)
local percent1 = round(percent, 0.001) 
outreg2 using "$output/tabc1.doc", addtext("Control Mean =", "`mean1'",)   dec(3)   append tex
drop cmean coef percent treat_dum500
local foo
restore
